package org.yang.order.food.controller;

import org.yang.order.food.common.Msg;
import org.yang.order.food.entity.Norms;
import org.yang.order.food.service.NormsService;
import org.springframework.web.bind.annotation.*;

import com.github.pagehelper.PageInfo;

import javax.annotation.Resource;
/**
 * 规格控制器
 * @author shichenyang
 * @email gyv12345@163.com
 * @date 2018/12/03
 */
@RestController
@RequestMapping("/norms")
public class NormsController {
    @Resource
    private NormsService normsService;

    @GetMapping("/getNormss")
    public PageInfo getNormss(Norms norms,Integer page,Integer limit){
        return normsService.getNormss(norms,page,limit);
    }
    @PostMapping("/addNorms")
    public Msg addNorms(Norms norms){
        return normsService.addNorms(norms);
    }

    @PutMapping("/updateNorms")
    public Msg updateNorms(Norms norms){
        return normsService.updateNorms(norms);
    }

    @DeleteMapping("/delNorms")
    public Msg delNorms(Norms norms){
        return normsService.delNorms(norms);
    }
}
